<template>
  <div class="q-pa-md">
    <t-img
      alt="加载失败啦"
      :src="url"
      width="150px"
      height="150px"
      :visible="true"
      :tabIndex="1"
      @click="refresh"
    >
    </t-img>
  </div>
</template>

<script>
import { ref } from 'vue';

export default {
  setup() {
    const url = ref('https://cdn.quasar.dev/img/no-image-src.png');

    return {
      url,
      refresh() {
        url.value =
          'https://cdn.quasar.dev/img/no-image-src.png?t=' + Math.random();
      },
    };
  },
};
</script>
